package sdm.sensor.nasdaq.floe;

import java.util.Date;

public class Tick {
	private String symbol;
	private double price;
	private Date timeStamp;

	public Tick(String s, double p, long t) {
			symbol = s;
            price = p;
            timeStamp = new Date(t);
	}

	public Tick(String s, double p) {
		symbol = s;
        price = p;
        timeStamp = new Date();
	}
	
	
	public double getPrice() {return price;}
	public String getSymbol() {return symbol;}
	public Date getTimeStamp() {return timeStamp;}
	
	public void setPrice(double price) {
		this.price = price;		
	}
	public void setTimeStamp(Date timeStamp) {
		this.timeStamp = timeStamp;		
	}

	public String toString() {
		return symbol + "> Price: " + price + " time: " + timeStamp.toString();
	}
	
	public String toCsv() {
		return symbol + "," + price + "," + timeStamp.toString();
	}
}



